/*
 * XML Type:  Status
 * Namespace: http://ofx.net/types/2003/04
 * Java type: net.ofx.types.x2003.x04.Status
 *
 * Automatically generated - do not modify.
 */
package net.ofx.types.x2003.x04.impl;
/**
 * An XML Status(@http://ofx.net/types/2003/04).
 *
 * This is a complex type.
 */
public class StatusImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements net.ofx.types.x2003.x04.Status
{
    
    public StatusImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName CODE$0 = 
        new javax.xml.namespace.QName("", "CODE");
    private static final javax.xml.namespace.QName SEVERITY$2 = 
        new javax.xml.namespace.QName("", "SEVERITY");
    private static final javax.xml.namespace.QName MESSAGE$4 = 
        new javax.xml.namespace.QName("", "MESSAGE");
    
    
    /**
     * Gets the "CODE" element
     */
    public java.lang.String getCODE()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(CODE$0, 0);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) the "CODE" element
     */
    public net.ofx.types.x2003.x04.ErrorType xgetCODE()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.ErrorType target = null;
            target = (net.ofx.types.x2003.x04.ErrorType)get_store().find_element_user(CODE$0, 0);
            return target;
        }
    }
    
    /**
     * Sets the "CODE" element
     */
    public void setCODE(java.lang.String code)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(CODE$0, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(CODE$0);
            }
            target.setStringValue(code);
        }
    }
    
    /**
     * Sets (as xml) the "CODE" element
     */
    public void xsetCODE(net.ofx.types.x2003.x04.ErrorType code)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.ErrorType target = null;
            target = (net.ofx.types.x2003.x04.ErrorType)get_store().find_element_user(CODE$0, 0);
            if (target == null)
            {
                target = (net.ofx.types.x2003.x04.ErrorType)get_store().add_element_user(CODE$0);
            }
            target.set(code);
        }
    }
    
    /**
     * Gets the "SEVERITY" element
     */
    public net.ofx.types.x2003.x04.SeverityEnum.Enum getSEVERITY()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(SEVERITY$2, 0);
            if (target == null)
            {
                return null;
            }
            return (net.ofx.types.x2003.x04.SeverityEnum.Enum)target.getEnumValue();
        }
    }
    
    /**
     * Gets (as xml) the "SEVERITY" element
     */
    public net.ofx.types.x2003.x04.SeverityEnum xgetSEVERITY()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.SeverityEnum target = null;
            target = (net.ofx.types.x2003.x04.SeverityEnum)get_store().find_element_user(SEVERITY$2, 0);
            return target;
        }
    }
    
    /**
     * Sets the "SEVERITY" element
     */
    public void setSEVERITY(net.ofx.types.x2003.x04.SeverityEnum.Enum severity)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(SEVERITY$2, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(SEVERITY$2);
            }
            target.setEnumValue(severity);
        }
    }
    
    /**
     * Sets (as xml) the "SEVERITY" element
     */
    public void xsetSEVERITY(net.ofx.types.x2003.x04.SeverityEnum severity)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.SeverityEnum target = null;
            target = (net.ofx.types.x2003.x04.SeverityEnum)get_store().find_element_user(SEVERITY$2, 0);
            if (target == null)
            {
                target = (net.ofx.types.x2003.x04.SeverityEnum)get_store().add_element_user(SEVERITY$2);
            }
            target.set(severity);
        }
    }
    
    /**
     * Gets the "MESSAGE" element
     */
    public java.lang.String getMESSAGE()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(MESSAGE$4, 0);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) the "MESSAGE" element
     */
    public net.ofx.types.x2003.x04.MessageType xgetMESSAGE()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.MessageType target = null;
            target = (net.ofx.types.x2003.x04.MessageType)get_store().find_element_user(MESSAGE$4, 0);
            return target;
        }
    }
    
    /**
     * True if has "MESSAGE" element
     */
    public boolean isSetMESSAGE()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(MESSAGE$4) != 0;
        }
    }
    
    /**
     * Sets the "MESSAGE" element
     */
    public void setMESSAGE(java.lang.String message)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(MESSAGE$4, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(MESSAGE$4);
            }
            target.setStringValue(message);
        }
    }
    
    /**
     * Sets (as xml) the "MESSAGE" element
     */
    public void xsetMESSAGE(net.ofx.types.x2003.x04.MessageType message)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.MessageType target = null;
            target = (net.ofx.types.x2003.x04.MessageType)get_store().find_element_user(MESSAGE$4, 0);
            if (target == null)
            {
                target = (net.ofx.types.x2003.x04.MessageType)get_store().add_element_user(MESSAGE$4);
            }
            target.set(message);
        }
    }
    
    /**
     * Unsets the "MESSAGE" element
     */
    public void unsetMESSAGE()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(MESSAGE$4, 0);
        }
    }
}
